//
//  Macro.h
//  即时通讯
//
//  Created by huangtao on 16/7/9.
//  Copyright © 2016年 fish. All rights reserved.
//

#ifndef Macro_h
#define Macro_h


#define NotificationCenter [NSNotificationCenter defaultCenter]
#define UserDefaults [NSUserDefaults standardUserDefaults]

#define REUSEID_OF(className) NSStringFromClass(CLASS_OF(className))
#define CLASS_OF(className) [className class]
#define OBJECT_OF(className) [[className alloc]init]
#define NAV_OF(className) [[UINavigationController alloc]initWithRootViewController:[[className alloc]init]]

#pragma mark- present & push

#define CLASS_PRESENT_NAV(presentVc,presentedVc_className) [presentVc presentViewController:NAV_OF(presentedVc_className) animated:YES completion:nil]

#define CLASS_PRESENT(presentVc,presentedVc_className) [presentVc presentViewController:OBJECT_OF(presentedVc_className) animated:YES completion:nil]

#define PRESENT(presentvc,presentedVC) [presentvc presentViewController:presentedVC animated:YES completion:nil]

#define CLASS_SELFNAV_PUSH (pushVc,pushedVc_className) [pushVc.navigationController pushViewController:OBJECT_OF(pushedVc_className) animated:YES];
#define CLASS_PUSH (nav,pushedVc_className) [nav pushViewController:OBJECT_OF(pushedVc_className) animated:YES];

#endif /* Macro_h */
